package org.dfzt.modules.online.cgform.converter.bb;

import org.dfzt.common.constant.ProvinceCityArea;
import org.dfzt.common.util.SpringContextUtils;
import org.dfzt.common.util.oConvertUtils;
import org.dfzt.modules.online.cgform.converter.aa.b;
import org.dfzt.modules.online.cgform.entity.OnlCgformField;



public class g
  extends b
{
  ProvinceCityArea c;
  
  public g(OnlCgformField paramOnlCgformField) {
    this.filed = paramOnlCgformField.getDbFieldName();
    this.c = (ProvinceCityArea)SpringContextUtils.getBean(ProvinceCityArea.class);
  }

  
  @Override
  public String converterToVal(String txt) {
    if (oConvertUtils.isEmpty(txt)) {
      return null;
    }
    return this.c.getCode(txt);
  }

  
  @Override
  public String converterToTxt(String val) {
    if (oConvertUtils.isEmpty(val)) {
      return null;
    }
    return this.c.getText(val);
  }
}
